home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1996 #15
/
Monster Media Number 15 (Monster Media)(July 1996).ISO
/
maximus
/
maxkit20.zip
/
MAXBDL20.ZIP
/
MAXBDL20.MEX
next >
Wrap
Text File
|
1996-02-06
|
4KB
|
107 lines
// ==========================================================================
// File: MAXBDL20.MEX
// Desc: Displays a list of users birthdays to con, file or both.
// Copyright 1995 1996 by Gerry Ellison. All rights reserved.
// Copyright 1995 by Lanius Corporation. All rights reserved.
// $Id: maxbdl20.mex 1.8 12/05/1995 24:08:00 gre Exp $
// --------------------------------------------------------------------------
#define MNU_PRESS_ENTER 106
#include <max.mh>
#include <intpad.mh>
int main(string: argv) { // begin birthday list
int: ok,cy,chh, cnt;
char: fd, nonstop;
string: cm,cd,bbs,LCB,LMB,YM,YB,GR;
string: line, line2, bdlpath;
struct _usr: u;
struct _stamp: now;
// CHANGE THIS FOR YOUR BBS.
// --------------------------------------------------------------------------
bdlpath := "C:\\Max\\Misc\\Birthlst.bbs"; // path and name of birthday list
bbs := " The Mountain Top BBS! "; // put your bbs name HERE!
// ATT. │ │NO longer then this!
// --------------------------------------------------------------------------
remove(bdlpath); // deletes Birthlst.bbs
timestamp(now);
cm:=intpadleft(now.date.month,2,'0');
cd:=intpadleft(now.date.day,2,'0');
cy:=(now.date.year)+1980;
reset_more(nonstop);
{
LCB:="\x16\x01\x10\x9B";
LMB:="\x16\x01\x10\x9D";
YM:="\x16\x01\x5E";
YB:="\x16\x01\x1e";
GR:="\x16\x01\x07";
print("\fMAXBDL18\n");
line := "\f\n "+LCB+"┌───────────────────────────────┬────────────────────────────────────────┐"+GR+"\n"+
" "+LCB+"│"+YM+"░▒▓█"+bbs+"█▓▒░"+LCB+"│ "+YB+cm+"-"+cd+"-"+itostr(cy)+LCB+" │"+GR+"\n"+
" "+LCB+"├───────────────────────────────┴────────────────────────────────────────┤"+GR+"\n"+
" "+LCB+"│ "+YB+"Congratulations to"+LCB+" │"+GR+"\n"+
" "+LCB+"│ "+bbs+" users who have birthdays today: │"+GR+"\n"+
" "+LCB+"├────────────────────────────────────────────────────────────────────────┤"+GR+"\n"+
" "+LCB+"│ │"+GR;
// if (argv <> "")
// print("Compiling C:\Max\Misc\Maxbdl18.bbs.\n");
if (argv = "")
print("\n"+line+"\n");
else
print("Compiling C:\Max\Misc\Maxbdl18.bbs.\n");
{
for (ok := userfindopen("","",u);
ok AND do_more(nonstop, COL_CYAN);
ok := userfindnext(u))
if(substr(u.dob,6,2)+substr(u.dob,9,2) = cm+cd)
{
cnt := cnt+1;
if (cnt = 1) {
fd := open(bdlpath, IOPEN_CREATE | IOPEN_WRITE);
writeln(fd, "");
writeln(fd,line);
}
line2 :=" "+LCB+"│ "+strpad(u.name,28,' ')+strpad(u.city,36,' ')+"│"+GR+"\n";
if (argv = "")
print(line2);
line2 :=" "+LCB+"│ "+strpad(u.name,28,' ')+strpad(u.city,36,' ')+"│"+GR;
writeln(fd, line2);
}
}
line :=" "+LCB+"│ │"+GR+"\n"+
" "+LCB+"╚════════════════════════════════════════════════════════════════════════╝"+GR+"\n";
if (argv = "")
print(line+"\n");
if (cnt >= 1) {
writeln(fd,line);
line := " â";
writeln(fd,line);
close(fd);
}
if (argv = "")
menu_cmd(MNU_PRESS_ENTER,"");
}
} // end birthday list